//在非组件页面需要引入大仓库
import pinia from "../store";
import userInfoStore from '../store/modules/user'
let buttonStore = userInfoStore(pinia)
export const isHasButton = (app: any) => {
    app.directive('has', {
        mounted(el: any, options: any) {
            console.log(options);
            if (!buttonStore.buttons.includes(options.value)) {
                el.parentNode.removeChild(el)
            }

        }
    })

}